﻿<Window x:Class="OmniKitsWindowsDemo.DesignAdornerDemo"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
        xmlns:ok="http://omnikits.codeplex.com/"
        xmlns:b="http://schemas.microsoft.com/expression/2010/interactions"
        Title="DesignAdornerDemo" Height="300" Width="300" Closing="Window_Closing">
    <Grid>
        <CheckBox x:Name="DesignModeSwitch" IsChecked="True"  Content="IsDesignMode" HorizontalAlignment="Right" Margin="10" VerticalAlignment="Top"/>

        <Border ok:DesignAdorner.IsDesignMode="{Binding IsChecked, ElementName=DesignModeSwitch}" HorizontalAlignment="Left" Height="58" Margin="29,117,0,0" VerticalAlignment="Top" Width="99">
            <Button Content="Grid"/>
        </Border>

        <Canvas>
            <Border ok:DesignAdorner.IsDesignMode="{Binding IsChecked, ElementName=DesignModeSwitch}" Height="58" Width="99">
                <Button Content="Unset"/>
            </Border>
            <Border ok:DesignAdorner.IsDesignMode="{Binding IsChecked, ElementName=DesignModeSwitch}" Canvas.Left="146" Canvas.Top="62" Height="58" Width="99">
                <Button Content="Top &amp; Left"/>
            </Border>
            <Border ok:DesignAdorner.IsDesignMode="{Binding IsChecked, ElementName=DesignModeSwitch}" Canvas.Bottom="0" Canvas.Right="0" Height="58" Width="99">
                <Button Content="Bottom &amp; Right"/>
            </Border>
        </Canvas>

    </Grid>
</Window>
